package com.lee.adapter.service.impl;

import com.lee.adapter.controller.HttpRequestController;
import com.lee.adapter.service.HandlerAdapter;

/**
 * @author zfl_a
 * @date 2020/8/16
 * @project springboot_design_pattern
 */
public class RequestMappingHandlerAdapter implements HandlerAdapter {

    @Override
    public boolean supports(Object handler) {
        return handler instanceof HttpRequestController;
    }

    @Override
    public String handle(Object handler)  {

        return ((HttpRequestController)handler).doRequestMapping();
    }
}
